<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <ul>
    <li>第一个li元素</li>
    <li>第二个li元素</li>
  </ul>
  <button>移除ul元素的第2个子元素节点</button>
  <script>
    var ul = document.querySelector('ul');
    var btn = document.querySelector('button');
    btn.onclick = function () {
      ul.removeChild(ul.children[1]);
    };
  </script>
</body>
</html>